package com.xingkeduo.model.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.xingkeduo.model.po.TStoreStaff;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Description TODO
 * @Date 2019/4/22 14:37
 * @Created 情绪十分不稳定的Shadow
 */

@JsonInclude(JsonInclude.Include.NON_NULL)
public class StoreStaffVo {

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long storeId;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long staffId;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long staffCode;
    private String weekStartDate;
    private String staffName;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long creator;
    private Date createTime;
    private String headUrl;
    private String craftsName;

    public StoreStaffVo(TStoreStaff storeStaff, String headUrl, String craftsName, Long code) {
        SimpleDateFormat simdf = new SimpleDateFormat("yyyy-MM-dd");
        this.id = storeStaff.getId();
        this.storeId = storeStaff.getStoreId();
        this.staffId = storeStaff.getStaffId();
        this.weekStartDate = simdf.format(storeStaff.getWeekStartDate());
        this.staffName = storeStaff.getStaffName();
        this.creator = storeStaff.getCreator();
        this.createTime = storeStaff.getCreateTime();
        this.headUrl = headUrl;
        this.craftsName = craftsName;
        this.staffCode = code;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getStoreId() {
        return storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    public Long getStaffId() {
        return staffId;
    }

    public void setStaffId(Long staffId) {
        this.staffId = staffId;
    }

    public String getWeekStartDate() {
        return weekStartDate;
    }

    public void setWeekStartDate(String weekStartDate) {
        this.weekStartDate = weekStartDate;
    }

    public String getStaffName() {
        return staffName;
    }

    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }

    public Long getCreator() {
        return creator;
    }

    public void setCreator(Long creator) {
        this.creator = creator;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getHeadUrl() {
        return headUrl;
    }

    public void setHeadUrl(String headUrl) {
        this.headUrl = headUrl;
    }

    public String getCraftsName() {
        return craftsName;
    }

    public void setCraftsName(String craftsName) {
        this.craftsName = craftsName;
    }

    public Long getStaffCode() {
        return staffCode;
    }

    public void setStaffCode(Long staffCode) {
        this.staffCode = staffCode;
    }
}
